﻿CREATE TABLE [dbo].[LeadComment]
(
	LeadCommentKey INT NOT NULL IDENTITY(1,1) CONSTRAINT PK_LeadComment PRIMARY KEY,
	LeadKey INT NOT NULL CONSTRAINT FK_LeadComment_Lead REFERENCES Lead(LeadKey),
	Comment nvarChar(MAX) NOT NULL,
	CreatedByKey INT NOT NULL CONSTRAINT FK_LeadComment_CreatedByKey REFERENCES Editor(EditorKey),
	CreatedDate DateTimeOffset NOT NULL 
		CONSTRAINT D_Lead_CommentCreatedDate DEFAULT (GetDate()),
	UpdatedByKey INT NOT NULL 
		Constraint FK_LeadComment_UpdatedByKey REFERENCES Editor(EditorKey),
	UpdatedDate DateTimeOffset NOT NULL 
		CONSTRAINT D_LeadComment_UpdatedDate DEFAULT (GetDate()),
)
